<template>
  <div class="addAdmin">
    <van-nav-bar
      @click-left="$router.back()"
      left-arrow
      title="新建管理员"
      fixed
    ></van-nav-bar>
    <main>
      <h3>扫描该二维码后将绑定成管理员</h3>
      <!-- @click="$router.push('/applyAdmin')" -->
      <div class="ewm">
        <img :src="adminQrCode" alt="" />
      </div>
      <h3>
        成为管理员后可对文章、视频、海报、招聘和活动等资源
        进行发布等更多功能期待您体验。
      </h3>
    </main>
  </div>
</template>

<script>
export default {
  data() {
    return {
      adminQrCode: "",
    };
  },
  created() {
    document.querySelector("html").style.backgroundColor = "#f3f5f7";
    document.querySelector("body").style.backgroundColor = "#f3f5f7";
  },
  mounted() {
    this.$store.dispatch("updateUserInfo");
    this.adminQrCode = this.$store.state.userInfo.adminQrCode;
  },
};
</script>
<style lang="less" scoped>
main {
  padding: 46px 15px 0;

  h3 {
    margin: 20px 0;
    font-size: 13px;
    color: #666666;
    line-height: 26px;
    letter-spacing: 1px;
  }
  .ewm {
    width: 345px;
    height: 345px;
    background-color: #ffffff;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    img {
      width: 328px;
      height: 328px;
    }
  }
}
</style>
